package com.jsits.v2x.fs8.schedule;

import com.jsits.v2x.fs8.service.Fs8LedDisplayService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class Fs8UpdateTask {
    @Autowired
    private Fs8LedDisplayService fs8LedDisplayService;

    @Scheduled(fixedRate = 2000)
    public void updateLedScreen() {
        log.info("task begin...");
        fs8LedDisplayService.updateLedScreen();
        log.info("task finish...");
    }
}
